export default {
    handleResponse: function (_this, resp) {
        const respData = JSON.parse(JSON.stringify(resp))
        if (respData.code === 403) {
            localStorage.setItem("isLogin", "false")
            _this.CONST.isLogin = false
            _this.$router.push("login").then(r => r)
        }
        return respData
    },
    isBlank: function (data) {
        return data == null || data === 'null' || data === '' || data === undefined || data === 'undefined' || data === 'unknown';
    },
    successMessage: function (_this, msg) {
        _this.$message({
            showClose: true,
            message: 'success : ' + msg,
            type: 'success'
        });
    },
    errorMessage: function (_this, msg) {
        _this.$message({
            showClose: true,
            message: 'error : ' + msg,
            type: 'error'
        });
    }
}

